package login;

//登录界面背景
import java.awt.*;
import javax.swing.*;


//自定义一个面板类
public class MyPanel extends JPanel{
  public void paintComponent(Graphics g){
      super.paintComponent(g);
      //绘制一张背景图片  
      Image image = new ImageIcon("img/login.jpg").getImage();
      g.drawImage(image, 0, 0,getWidth(),getHeight(), this);
  }
}
